<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/jsplib/pubhead.jsp"%>
<%@ page import="net.comm.common.ValueMaping" %>
<%@ taglib uri="/WEB-INF/myTaglib.tld" prefix="tag"%>
<%@ taglib prefix="myfn" uri="/WEB-INF/jstlfun.tld" %>
<%@ taglib uri="/WEB-INF/c.tld"  prefix="c"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="x-ua-compatible" content="ie=7" />
	<TITLE>我的相册照片:i友邻社区</TITLE>

	<link rel="stylesheet" type="text/css" href="${cpath}/css/main.css" />
	<link rel="stylesheet" type="text/css" href="${cpath}/css/leftmenu.css" />
	<link rel="stylesheet" type="text/css" href="${cpath}/css/layout.css">
	<link rel="stylesheet" type="text/css" href="${cpath}/css/group.css" />
	
</head>
<body>
<script> 
	//转页面
	var curUserID = '${userID}';
	if((curUserID == "")||(curUserID == null)){
//		parent.window.location.replace("${cpath}/index.jsp"); 
	}
	function change_width(img_name,wid,hei)
	{
		var CurImage=new Image();
		if(CurImage.src!=img_name.src)
		{
			CurImage.src=img_name.src;
		}
		var img_width = CurImage.width;
		var img_height = CurImage.height;
		img_name.width = img_width;
		img_name.height = img_height;

		if(img_height/hei > img_width/wid)
		{
			if( img_height > hei)
			{
				img_name.width = img_name.width/img_name.height*hei;
				img_name.height = hei;
			}
		}
		else
		{
			if( img_width > wid)
			{
				img_name.height = img_name.height/img_name.width*wid;
				img_name.width = wid;
			}
		}
		return true;
	}
</script>

 	<!-- 页首 {{{ -->
	<%@ include file="/menu.jsp"%>
   
	<div id="mainBody">
	<!-- 左边菜单栏 {{{ -->
	<%@ include file="/leftmenu.jsp"%>

		<DIV id=group>

		<!-- 右侧宽栏 {{{ -->
		<DIV class=group_mid>

			<div class='subtop' >
					<p><a href="${cpath}/qunzu_${theForm.qryGroupID}"><img src="${cpath}/${myfn:getGroupPic(theForm.qryGroupID)}" ></a></p>
				<dl >
					<dt class="tit"><a href="${cpath}/qunzu_${theForm.qryGroupID}">${myfn:getGroupName(theForm.qryGroupID)}</a> &gt; <a href="#">照片</a></dt>
					<dd class="intro">专辑：${albumForm.albumname}</dd>
				</dl>
				<div class='fun'>
					<li><a href="javascript:history.go(-1);">返回上一页</a></li>
				</div>
			</div>
			<div id="section-header">
					<ul class="related-links" style="float:left">
						<li><a>共&nbsp;${picnum}&nbsp;张</a></li><li><a href="${cpath}/qunzu_${theForm.qryGroupID}/xiangce">返回专辑列表</a></li>
					</ul>
					<ul class="related-links">
						<c:if test="${myfn:groupAddFlag(theForm.qryGroupID,userID) ==  1}">
						<li><a href="${cpath}/gpicture.do?action=addPage&groupID=${theForm.qryGroupID}&GAlbumID=${theForm.qryGAlbumID}">上传照片</a></li>
						</c:if>
					</ul>
			</div>
			<DIV class='whole'><!-- 右侧宽栏 }}}-->
	
			<c:forEach var="pic" items="${piclist}" varStatus="status">   
			<div class='smallpic' >
				<p><a href="${cpath}/qunzu_${theForm.qryGroupID}/zhaopian_${pic.GPicID}"><img src="${cpath}/${pic.folder}${pic.name}" onload="change_width(this,132,100)"></a></p>
				<dl>
					<dd class="info">上传：<span>${myfn:getUserNick(pic.userID)}</span></dd>
				</dl>
			</div>
			</c:forEach> 			

			</div>			

		</DIV><!-- profile_mid }}} -->
		</DIV><!-- group end }}} -->

	<DIV class="clear"></DIV>
	<%@ include file="/indexfoot.jsp"%>
</DIV><!-- cont}}} -->
</body>
</html>
<!---->

<script>

    /**
     * 检查项目资料维护
     */
	function doConfirm()
	{
		var form = document.theForm;

		var action = form['action'];

    form.submit();
	}

	/**
   * 根据具体请求设置各个组件状态	
   */
  function showState()
	{
		var action = '${theForm.action}';
		var form = document.theForm;		
		if(action == 'detail')
		{
           
			document.getElementById("back").style.display = "none";

		}
		else if(action == 'modifyPage' || action == 'update')
		{

			form['action'].value = 'update';
		}

	}
	showState();


</script>

